Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oteljava: correctly capture exemplars. sdk, oteljava: use shared BaseMeterSuite #660

Merged
merged 1 commit into from
May 4, 2024

Conversation

iRevive
Copy link
Contributor

@iRevive iRevive commented May 1, 2024

This PR accomplishes two things:
1) fixes oteljava backend to capture exemplars correctly

OpenTelemetry Java uses JContext.current() to attach trace_id/span_id to an exemplar. The context cannot be propagated seamlessly between CE IOLocal and oteljava ThreadLocal. There are more details: #202 and a possible fix #214 (waiting for CE, though).

To make it work, we can propagate the context manually.

2) tests both implementations (sdk and oteljava) using a shared BaseMeterSuite

That way we can guarantee that the behavior is identical

@iRevive iRevive added the metrics Improvement to metrics module label May 1, 2024
@iRevive iRevive requested a review from NthPortal May 1, 2024 10:22
@iRevive iRevive force-pushed the sdk/meter-suite branch from 09a6ef1 to 1f161ba Compare May 1, 2024 10:25
@iRevive iRevive mentioned this pull request May 1, 2024
10 tasks
sdk, oteljava: use shared `BaseMeterSuite`.
@iRevive iRevive force-pushed the sdk/meter-suite branch from 1f161ba to cebe024 Compare May 1, 2024 20:44
@iRevive iRevive merged commit 0dd9286 into typelevel:main May 4, 2024
10 checks passed
@iRevive iRevive deleted the sdk/meter-suite branch May 4, 2024 06:32
@NthPortal
Copy link
Contributor

@iRevive I'm assuming you didn't mean to close #214?

@iRevive
Copy link
Contributor Author

iRevive commented May 15, 2024

@NthPortal oh, no I didn't! I guess I linked the wrong task/PR, and it closed automatically. Thanks for pointing out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metrics Improvement to metrics module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants